<div class="fadeIn">
    <br>
    <ol class="breadcrumb" style="margin-bottom: 0px">
        <li class="active"><span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;<mainpage>
            </mainpage>
        </li>
        <li class="active">业务工作台 / 短信查询 / 短信发送明细</li>
    </ol>
    <div class="table-box">
        <div style="width: 1200px;">
            <form class="form-inline" onkeydown="if(event.keyCode==13)return false;" action="sendSm/out-excel"
                method="post" id="form">
                <div class="clearfix" style='margin-bottom:25px;'>
                    <div class="control-group row marT15 marR10 left" style="margin-left:0px;">
                        <span class="search-name">时间选择</span><span class='daysTip'
                            style='top:30px;'>(查询时间范围不得超过31天)</span>
                        <div class="controls" style='width:200px'>
                            <input type="text" ng-model="searchData.startDate" placeholder="" name="startDate"
                                style="display: none;">
                            <input type="text" ng-model="searchData.endDate" placeholder="" name="endDate"
                                style="display: none;">
                            <div class="input-prepend input-group">
                                <span class="add-on input-group-addon"><i
                                        class="glyphicon glyphicon-calendar fa fa-calendar"></i></span><input
                                    type="text" readonly style="width: 155px" id="sendDetatDate" class="form-control" />
                                <!-- <span class="input-group-addon" ng-click='clearTime()'>清空</span> -->
                            </div>
                        </div>
                    </div>
                    <div class="left marT15 marR10">
                        <span class="search-name">数据范围</span>
                        <select class="form-control1" ng-model="searchData.limitCount" name="limitCount"
                            style='width:110px'>
                            <!-- ng-change='getSms()' -->
                            <option value="">全部</option>
                            <option value='10000'>前10000条</option>
                        </select>
                    </div>
                    <div class="left marT15 marR10">
                        <span class="search-name">递交结果</span>
                        <select class="form-control1" ng-model="searchData.sendCode" name="sendCode"
                            style='width:110px'>
                            <!-- ng-change='getSms()' -->
                            <option value="">全部</option>
                            <option value='0'>成功</option>
                            <option value='1'>失败</option>
                        </select>
                    </div>
                    <div class="left marT15 marR10">
                        <span class="search-name">报告结果</span>
                        <select class="form-control1" ng-model="searchData.resultCode" name="resultCode"
                            style='width:110px'>
                            <!-- ng-change='getSms()' -->
                            <option value="">全部</option>
                            <option value='0'>成功</option>
                            <option value='1'>失败</option>
                            <option value='2'>未返回</option>
                        </select>
                    </div>
                    <div class="left marT15 marR10">
                        <span class="search-name">业务端类型</span>
                        <select class="form-control1" ng-change='getSms()' ng-model="searchData.svrNode" name="svrNode">
                            <option value="">全部</option>
                            <option value={{row.SVR_NODE}} ng-repeat="row in listData1">{{row.SVR_NODE_NAME}}</option>
                        </select>
                    </div>
                    <div class="left marT15 marR10">
                        <span class="search-name">短信类型</span>
                        <select class="form-control1" ng-model="searchData.serviceCode" name="serviceCode">
                            <option value="">全部</option>
                            <option value={{row.serviceCode}} ng-repeat="row in listData2">{{row.serviceName}}</option>
                        </select>
                    </div>
                    <div class="left marT15 marR10" style="position: relative;">
                        <span class="search-name">号码</span>
                        <input type="text" class="form-control1 userNo" placeholder="" ng-model="searchData.userNo"
                            ng-keyup='search($event)' name="userNo" style='width:90px'>
                        <span style="color: red; position: absolute; top: 30px; left: 30px;">{{errors}}</span>
                    </div>
                    <div class="left marT15 marR10">
                        <span class="search-name">短信序号</span>
                        <input type="text" class="form-control1" placeholder="" ng-model="searchData.smSeq"
                            ng-keyup='search($event)' name="smSeq" style='width:50px'>
                    </div>
                    <a href="javascript:;" class=" btn btn-sm btn-primary left marT15" id="search"
                        ng-click='search()'><span class="glyphicon glyphicon-search"></span></a>
                    <div class="right marT15" style="position:relative">
                        <button class="btn btn-primary btn-sm" ng-click='outExcel()'><img
                                style="width:25px; height:20px;" src="img/excel.png">导出表格<span ng-style='loadStyle'
                                class="outExcelLoad"><img src="img/load.gif"></span>
                        </button>
                    </div>
                </div>
                <!-- 下钻导出表格参数 -->
                <input type="text" ng-model='searchData.sendSuc' name="sendSuc" style="display: none">
                <input type="text" ng-model='searchData.recvFail' name="recvFail" style="display: none">
                <input type="text" ng-model='searchData.sendFail' name="sendFail" style="display: none">
                <input type="text" ng-model='searchData.recvSuc' name="recvSuc" style="display: none">
                <input type="text" ng-model='searchData.recvNone' name="recvNone" style="display: none">
            </form>


            <table class="table table-bordered table-striped text-center bg-info">
                <thead>
                    <tr class="info">
                        <th class="text-center">序号</th>
                        <th class="text-center">日期</th>
                        <th class="text-center">短信序号</th>
                        <th class="text-center">号码</th>
                        <th class="text-center">接收时间</th>
                        <th class="text-center">递交时间</th>
                        <th class="text-center">递交结果</th> <!-- 新增一格 -->
                        <th class="text-center">报告返回时间</th>
                        <th class="text-center">报告结果</th>
                        <th class="text-center">业务端</th>
                        <th class="text-center">短信类型</th>
                        <th class="text-center">短信内容</th>
                        <th class="text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="Item in result">
                        <td>{{ $index+1 }}</td>
                        <td>{{ Item.sendTimeDate }}</td>
                        <td class="w85">{{ Item.smSeq }}</td>
                        <td class="w85">{{ Item.userNo }}</td>
                        <td class="w85">{{ Item.recvTimeTime }}</td>
                        <td class="w85">{{ Item.sendTimeTime }}</td>
                        <td class="w85">{{ Item.sendMsg }}</td><!-- 对应新增一字段 -->
                        <td class="w115">{{ Item.recvReportTimeTime }}</td>
                        <td class="w85">{{ Item.resultMsg }}</td>
                        <td class="w70">{{ Item.srvName }}</td>
                        <td class="w85">{{ Item.serviceName }}</td>
                        <td style="word-break: break-all; min-width:400px!important;">
                            <a ng-click="seeDetail(Item.recId)" data-toggle="modal" data-target="#add">
                                {{ Item.smContent | showSms}}</a>
                        </td>
                        <td><a class="" data-toggle="modal" data-target="#add" ng-click="seeDetail(Item.recId)">查看详情</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div class="flip">
        <page></page>
    </div>
</div>
<!-- 查看详情弹窗 -->
<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="add">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width:620px">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="">查看详情</h4>
            </div>
            <div class="modal-body">
                <div class="table-box table-modal">
                    <table class="table table-bordered table-striped text-center bg-info">
                        <tbody>
                            <tr>
                                <td>短信序号</td>
                                <td>{{ detailData.smSeq }}</td>
                                <td>用户号码</td>
                                <td>{{ detailData.userNo }}</td>
                            </tr>
                            <tr>
                                <td>发送时间</td>
                                <td>{{ detailData.recvReportTime }}</td>
                                <td>发送结果</td>
                                <td>{{ detailData.resultMsg }}</td>
                            </tr>
                            <tr>
                                <td>业务端</td>
                                <td>{{ detailData.srvName  }}</td>
                                <td>发送通道</td>
                                <td>{{ detailData.gateLinkName }}</td>
                            </tr>
                            <tr>
                                <td>短信内容</td>
                                <td colspan="3">{{ detailData.smContent  }}</td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    <div ng-click="showAll = !showAll">
                                        <a>{{ showAll ? '点击收起' : '更多详细' }}</a>
                                    </div>
                                </td>
                            </tr>
<!--                            <tr ng-if="showAll">-->
<!--                                <td>短信类型</td>-->
<!--                                <td>{{ detailData.serviceName }}</td>-->
<!--                                <td>发送端口</td>-->
<!--                                <td>{{ detailData.sendport }}</td>-->
<!--                            </tr>-->
                            <tr ng-if="showAll">
                                <td>业务系统提交时间</td>
                                <td>{{ detailData.recvTime }}</td>
                                <td>提交结果</td>
                                <td>{{ detailData.sendMsg }}</td>
                            </tr>
<!--                                <tr>-->
<!--                                    <td>接收时间</td>-->
<!--                                    <td>{{ detailData.recvTime }}</td> &lt;!&ndash; sendFeedbackTimeTime &ndash;&gt;-->
<!--                                    <td>递交结果说明</td>-->
<!--                                    <td>{{ detailData.sendMsg }}</td>-->
<!--                                </tr>-->
                            <tr ng-if="showAll">
                                <td>短信平台提交时间</td>
                                <td>{{ detailData.sendTime }}</td>
                                <td>发送结果</td>
                                <td>{{ detailData.resultCode }}</td>
                            </tr>
<!--                                <tr>-->
<!--                                    <td>递交时间</td>-->
<!--                                    <td>{{ detailData.sendTime }}</td>-->
<!--                                    <td>状态报告码</td>-->
<!--                                    <td>{{ detailData.resultCode }}</td>-->
<!--                                </tr>-->
                            <!--                            <tr ng-if="showAll">-->
                            <!--                                <td>状态报告时间</td>-->
                            <!--                                <td>{{ detailData.recvReportTime }}</td>-->
                            <!--                                <td>状态报告说明</td>-->
                            <!--                                <td>{{ detailData.resultMsg }}</td>-->
                            <!--                            </tr>-->
                            <tr ng-if="showAll">
                                <td>手机用户接收时间</td>
                                <td>{{ detailData.recvReportTime }}</td>
                                <td>发送结果</td>
                                <td>{{ detailData.resultMsg }}</td>
                            </tr>
                            <tr ng-if="showAll">
                                <td>短信返回时间</td>
                                <td>{{ detailData.sendFeedbackTime }}</td>
                                <td>递交结果</td>
                                <td ng-if='""==detailData.sendFeedbackResult'></td>
                                <td ng-if='"0"==detailData.sendFeedbackResult'>成功</td>
                                <td ng-if='"0"!=detailData.sendFeedbackResult&&""!=detailData.sendFeedbackResult'>失败
                                </td>
                            </tr>
                            <tr ng-if="showAll">
                                <td>业务系统报告时间</td>
                                <td>{{ detailData.reportFeedbackTime }}</td>
                                <td>报告结果</td>
                                <td ng-if='""==detailData.reportFeedbackResult'></td>
                                <td ng-if='"0"==detailData.reportFeedbackResult'>成功</td>
                                <td ng-if='"0"!=detailData.reportFeedbackResult&&""!=detailData.reportFeedbackResult'>失败
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <!--  <button type="button" class="btn btn-primary btn-sm" ng-click="editSave()">保存</button> -->
            </div>
        </div>
    </div>
</div>
<!-- 加载框 -->
<span class='loaded' ng-show='loaded'><img src="img/load.gif"></span>
<!-- 加载框 完成-->